<html>
<head><meta charset="utf-8"><title>I-prioritize #76432 Incorrect MIR optimizations at level 3:… · t-compiler/wg-prioritization/alerts · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/index.html">t-compiler/wg-prioritization/alerts</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2376432.20Incorrect.20MIR.20optimizations.20at.20level.203.3A.E2.80.A6.html">I-prioritize #76432 Incorrect MIR optimizations at level 3:…</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="210499417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2376432%20Incorrect%20MIR%20optimizations%20at%20level%203%3A%E2%80%A6/near/210499417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2376432.20Incorrect.20MIR.20optimizations.20at.20level.203.3A.E2.80.A6.html#210499417">(Sep 18 2020 at 10:06)</a>:</h4>
<p><span class="user-group-mention" data-user-group-id="3111">@WG-prioritization/alerts</span> issue <a href="https://github.com/rust-lang/rust/issues/76432">#76432</a> has been requested for prioritization.</p>
<h1><a href="https://forge.rust-lang.org/compiler/prioritization/procedure.html#assign-priority-to-unprioritized-issues-with-i-prioritize-label">Procedure</a></h1>
<ul>
<li>Priority?</li>
<li>Regression?</li>
<li>Notify people/groups?</li>
<li>Needs <code>I-nominated</code>?</li>
</ul>



<a name="210542994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2376432%20Incorrect%20MIR%20optimizations%20at%20level%203%3A%E2%80%A6/near/210542994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> James Gill <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2376432.20Incorrect.20MIR.20optimizations.20at.20level.203.3A.E2.80.A6.html#210542994">(Sep 18 2020 at 16:21)</a>:</h4>
<p>Hi, was looking into this, trying to get my head around the way this works. Due to it being an unsoundness bug we are in P-High/P-Crit territory?</p>



<a name="210543235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2376432%20Incorrect%20MIR%20optimizations%20at%20level%203%3A%E2%80%A6/near/210543235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2376432.20Incorrect.20MIR.20optimizations.20at.20level.203.3A.E2.80.A6.html#210543235">(Sep 18 2020 at 16:23)</a>:</h4>
<p>that sounds right</p>



<a name="210543264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2376432%20Incorrect%20MIR%20optimizations%20at%20level%203%3A%E2%80%A6/near/210543264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2376432.20Incorrect.20MIR.20optimizations.20at.20level.203.3A.E2.80.A6.html#210543264">(Sep 18 2020 at 16:23)</a>:</h4>
<p>although this one is a little odd because miri caught it, so it <em>might</em> not be affecting code in the wild</p>



<a name="210543281"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2376432%20Incorrect%20MIR%20optimizations%20at%20level%203%3A%E2%80%A6/near/210543281" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2376432.20Incorrect.20MIR.20optimizations.20at.20level.203.3A.E2.80.A6.html#210543281">(Sep 18 2020 at 16:23)</a>:</h4>
<p>I would say P-high maybe?</p>



<a name="210543380"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2376432%20Incorrect%20MIR%20optimizations%20at%20level%203%3A%E2%80%A6/near/210543380" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> James Gill <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2376432.20Incorrect.20MIR.20optimizations.20at.20level.203.3A.E2.80.A6.html#210543380">(Sep 18 2020 at 16:24)</a>:</h4>
<p>Yeah, ngl first experience with Miri today haha, and yeah, isn't a crit in my eyes</p>



<a name="210543655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2376432%20Incorrect%20MIR%20optimizations%20at%20level%203%3A%E2%80%A6/near/210543655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2376432.20Incorrect.20MIR.20optimizations.20at.20level.203.3A.E2.80.A6.html#210543655">(Sep 18 2020 at 16:26)</a>:</h4>
<p><code>P-high</code> makes sense I think. We recently changed <code>mir-opt-level=3</code> to mean that these opts have a compile time cost but are not unsound</p>



<a name="210543666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2376432%20Incorrect%20MIR%20optimizations%20at%20level%203%3A%E2%80%A6/near/210543666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2376432.20Incorrect.20MIR.20optimizations.20at.20level.203.3A.E2.80.A6.html#210543666">(Sep 18 2020 at 16:26)</a>:</h4>
<p>iirc</p>



<a name="210543706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2376432%20Incorrect%20MIR%20optimizations%20at%20level%203%3A%E2%80%A6/near/210543706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2376432.20Incorrect.20MIR.20optimizations.20at.20level.203.3A.E2.80.A6.html#210543706">(Sep 18 2020 at 16:27)</a>:</h4>
<p>before that there were quite a few known unsound opts at <code>mir-opt-level=3</code></p>
<p>edit: <code>mir-opt-level=2</code> apparently <span aria-label="shrug" class="emoji emoji-1f937" role="img" title="shrug">:shrug:</span></p>



<a name="210543775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2376432%20Incorrect%20MIR%20optimizations%20at%20level%203%3A%E2%80%A6/near/210543775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2376432.20Incorrect.20MIR.20optimizations.20at.20level.203.3A.E2.80.A6.html#210543775">(Sep 18 2020 at 16:27)</a>:</h4>
<p><span class="user-mention" data-user-id="216206">@lcnr</span> do you happen to know the default for the compiler that's released?</p>



<a name="210543781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2376432%20Incorrect%20MIR%20optimizations%20at%20level%203%3A%E2%80%A6/near/210543781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2376432.20Incorrect.20MIR.20optimizations.20at.20level.203.3A.E2.80.A6.html#210543781">(Sep 18 2020 at 16:28)</a>:</h4>
<p>(<code>mir-opt-level</code> can only be set on nightly, so this is definitely not <code>P-critical</code> imo)</p>



<a name="210543836"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2376432%20Incorrect%20MIR%20optimizations%20at%20level%203%3A%E2%80%A6/near/210543836" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2376432.20Incorrect.20MIR.20optimizations.20at.20level.203.3A.E2.80.A6.html#210543836">(Sep 18 2020 at 16:28)</a>:</h4>
<p><code>mir-opt-level=1</code> I think</p>



<a name="210543856"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2376432%20Incorrect%20MIR%20optimizations%20at%20level%203%3A%E2%80%A6/near/210543856" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2376432.20Incorrect.20MIR.20optimizations.20at.20level.203.3A.E2.80.A6.html#210543856">(Sep 18 2020 at 16:28)</a>:</h4>
<p>thanks!</p>



<a name="210543982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2376432%20Incorrect%20MIR%20optimizations%20at%20level%203%3A%E2%80%A6/near/210543982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2376432.20Incorrect.20MIR.20optimizations.20at.20level.203.3A.E2.80.A6.html#210543982">(Sep 18 2020 at 16:29)</a>:</h4>
<p>See <a href="https://github.com/rust-lang/compiler-team/issues/319">https://github.com/rust-lang/compiler-team/issues/319</a> for the current design (at least I think that this is the current one <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span> )</p>



<a name="210546812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2376432%20Incorrect%20MIR%20optimizations%20at%20level%203%3A%E2%80%A6/near/210546812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2376432.20Incorrect.20MIR.20optimizations.20at.20level.203.3A.E2.80.A6.html#210546812">(Sep 18 2020 at 16:54)</a>:</h4>
<p>Yeah, I'm working on implementing part of that MCP.</p>



<a name="210546976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2376432%20Incorrect%20MIR%20optimizations%20at%20level%203%3A%E2%80%A6/near/210546976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2376432.20Incorrect.20MIR.20optimizations.20at.20level.203.3A.E2.80.A6.html#210546976">(Sep 18 2020 at 16:55)</a>:</h4>
<p>IMO this is P-medium since you have to use <code>-Zmir-opt-level=3</code> and you can only do so on nightly. There's no way a stable or beta user could be affected. <code>-Zmir-opt-level=3</code> has had unsoundness for a long time anyway so this not a recent issue by any means.</p>



<a name="210547076"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2376432%20Incorrect%20MIR%20optimizations%20at%20level%203%3A%E2%80%A6/near/210547076" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2376432.20Incorrect.20MIR.20optimizations.20at.20level.203.3A.E2.80.A6.html#210547076">(Sep 18 2020 at 16:55)</a>:</h4>
<p>ah, I thought that the MCP was already implemented. In this case <code>P-medium</code> also seems fine to me.</p>



<a name="210549823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2376432%20Incorrect%20MIR%20optimizations%20at%20level%203%3A%E2%80%A6/near/210549823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> DPC <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2376432.20Incorrect.20MIR.20optimizations.20at.20level.203.3A.E2.80.A6.html#210549823">(Sep 18 2020 at 17:20)</a>:</h4>
<p>agreed with p-med</p>



<a name="210592932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2376432%20Incorrect%20MIR%20optimizations%20at%20level%203%3A%E2%80%A6/near/210592932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2376432.20Incorrect.20MIR.20optimizations.20at.20level.203.3A.E2.80.A6.html#210592932">(Sep 19 2020 at 02:26)</a>:</h4>
<p>It looks like no one applied the <code>P-medium</code> label. I tried to apply it but I guess it won't work until the team PR gets merged :)</p>



<a name="210594031"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2376432%20Incorrect%20MIR%20optimizations%20at%20level%203%3A%E2%80%A6/near/210594031" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2376432.20Incorrect.20MIR.20optimizations.20at.20level.203.3A.E2.80.A6.html#210594031">(Sep 19 2020 at 02:58)</a>:</h4>
<p>Issue <a href="https://github.com/rust-lang/rust/issues/76432">#76432</a>'s prioritization request has been removed.</p>



<a name="210595173"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize%20%2376432%20Incorrect%20MIR%20optimizations%20at%20level%203%3A%E2%80%A6/near/210595173" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/245100-t-compiler/wg-prioritization/alerts/topic/I-prioritize.20.2376432.20Incorrect.20MIR.20optimizations.20at.20level.203.3A.E2.80.A6.html#210595173">(Sep 19 2020 at 03:34)</a>:</h4>
<p>applied P-medium</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>